package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 系统渠道
 */
@Getter
@AllArgsConstructor
public enum XtqdEnum {
    XTQD_XWTJR(11, "外系统接入"),

    XTQD_LYPT(21, "联用平台");

    private final Integer dm;

    private final String mc;

    public static String getMc(Integer dm) {
        XtqdEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
